Ext.define('Seq.widget.ChartPanel', {
    extend: 'Ext.panel.Panel',
    xtype: 'chartpanel',

    controller: 'chartpanelcontroller',

    listeners: {
        refreshdata: 'onRefreshData'
    },

    header: false,
    tbar: ['->', {
        xtype: 'tbtext',
        text: '查询时段：'
    }, {
        xtype: 'xsegmentedbutton',
        bind: {
            value: '{interval}'
        },
        items: [{
            text: '1小时',
            value: 'pt1h'
        }, {
            text: '6小时',
            value: 'pt6h'
        }, {
            text: '12小时',
            value: 'pt12h'
        }, {
            text: '1天',
            value: 'p1d'
        }, {
            text: '7天',
            value: 'p7d'
        }, {
            text: '15天',
            value: 'p15d'
        }, {
            text: '1月',
            value: 'p1m'
        }],
        listeners: {
            change: 'onParamsChange'
        },
    }, {
        xtype: 'tbtext',
        text: '数据颗粒度：'
    }, {
        xtype: 'xsegmentedbutton',
        bind: {
            value: '{period}'
        },
        items: [{
            text: '10秒',
            value: 'pt10s'
        }, {
            text: '30秒',
            value: 'pt30s'
        }, {
            text: '1分钟',
            value: 'pt1m'
        }, {
            text: '5分钟',
            value: 'pt5m'
        }, {
            text: '15分钟',
            value: 'pt15m'
        }, {
            text: '30分钟',
            value: 'pt30m'
        }],
        listeners: {
            change: 'onParamsChange'
        }
    }]

});